export const port = process.env.PORT || 3000
export const APP_NAME = process.env.APP_NAME || ''
export const SALT_LENGTH = 5
export const TOKEN_RANDOM_LENGTH = 8

export const APP_PUBLIC_KEY =
    "-----BEGIN PUBLIC KEY-----\n" +
    "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr4jn9LE4kXUwhRLy3iStTFPCj\n" +
    "tSnk4xAVL8ma39wsVu8OWG57MJNxTLZvjmKjlrqBFv65FJ9CsquiWaV1u4Q/kQ0y\n" +
    "gohCoD7cEjjO4GjRxx36AW7Z2oUH6uNGTS8AaFV2EaVfO8itOCq0R8I79Cv6pMGQ\n" +
    "Y2oTItZDwJogjBYWHwIDAQAB\n" +
    "-----END PUBLIC KEY-----\n"
export const APP_PRIVATE_KEY =
    "-----BEGIN PRIVATE KEY-----\n" +
    "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAKviOf0sTiRdTCFE\n" +
    "vLeJK1MU8KO1KeTjEBUvyZrf3CxW7w5Ybnswk3FMtm+OYqOWuoEW/rkUn0Kyq6JZ\n" +
    "pXW7hD+RDTKCiEKgPtwSOM7gaNHHHfoBbtnahQfq40ZNLwBoVXYRpV87yK04KrRH\n" +
    "wjv0K/qkwZBjahMi1kPAmiCMFhYfAgMBAAECgYBPQrH08lJSaIdrq/POOr20wSo6\n" +
    "g5b/CknnSzMPbP1toOT524OO4RaMn5BdHu6TezUjxAPQOxc5vYRyCB7JjJ/torDV\n" +
    "BLiRQAYWzjymdWpmi3Vr+VqdZrR0BCnvKFEC9KzWYncuu0ghkf41Uf8znx7A0G2Y\n" +
    "idJ42obmK/e3Yw5CGQJBANN8FUwR6eCy/2dq4sGDDSZz5pG5xQQyB/H+dFsx1PC/\n" +
    "77i8QRUhJfX80FL51cUXj5NFOj2y4K0wbmwHJx2RlTsCQQDQEDs6oizuexug/b5K\n" +
    "2rjp2n36JriT3M6u4jvWl6+MbKBrE3ICX+QU+MZqkz0jt5GktP2JsH/VQuMN7XDd\n" +
    "g+RtAkBPAJFsI1z9BaEHXxRqOayV6sH9OipxEMeLDQUmdA0aCnlgx2KApCtsIw8n\n" +
    "kBDdWZnW6AuDtOjdibQWQu3Hy/S1AkBEzzlnWL8XV6t5gLFwPAmvfUzwb+HXNM09\n" +
    "1SAJBj1OaZZcEyA/XMsnjGbCVFOB/nGyUREQekislORWdNJA0B+5AkBh7bRBmzqJ\n" +
    "I6i7qhB+tU0X1rp02Uo5MPWvbcXuTey2kenlw3fsb5ibs8QAF+gu4qmMC1d2dTch\n" +
    "peG13yIrx0YJ\n" +
    "-----END PRIVATE KEY-----\n"

const model = "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"

export function saltrandom() {
    let k = ""
    for (let i = 0; i < SALT_LENGTH; i++) {
        k += model.charAt(parseInt((Math.random() * model.length).toString()))
    }
    console.log(k)
    return k
}

export function tokenkeydom() {
    let k = ""
    for (let i = 0; i < TOKEN_RANDOM_LENGTH; i++) {
        k += model.charAt(parseInt((Math.random() * model.length).toString()))
    }
    console.log(k)
    return k
}